import request from '@/utils/request';

/**
 * GET 供货确认详情页面（事业部/集团）
 * @pathParam apiVersion true
 * @queryParam projectName false
 * @queryParam status false
 * @queryParam versionDate true
 */
export function supplyConfirmDetailTwoUsingGET({ params, data }) {
  return request('supplyPlan/SupplyConfirmDetailTwo', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * PUT 取消供货确认（集团）
 * @pathParam apiVersion true
 * @queryParam projectId true
 * @queryParam versionDate true
 */
export function cancelSupplyConfirmUsingPUT({ params, data }) {
  return request('supplyPlan/cancelSupplyConfirm', {
    method: 'PUT',
    params,
    data,
  });
}

/**
 * POST 创建供货计划版本【后台测试用】
 * @pathParam apiVersion true
 * @queryParam priceVersionId true
 * @queryParam versionType true
 */
export function createSupplyPlanVersionUsingPOST({ params, data }) {
  return request('supplyPlan/castDecisionVersion', {
    method: 'POST',
    params,
    data,
  });
}

/**
 * POST 消除供货确认待办消息(单个项目)--同供货确认消除待办【后台测试用】
 * @pathParam apiVersion true
 * @queryParam projectId true
 */
export function cleanToDoUsingPOST({ params, data }) {
  return request('supplyPlan/cleanToDo', {
    method: 'POST',
    params,
    data,
  });
}

/**
 * GET 消除逾期没确认待办任务(批量)--同每月1号6点定时任务【后台测试用】
 * @pathParam apiVersion true
 */
export function closeSupplyConfirmTaskUsingGET({ params, data }) {
  return request('supplyPlan/closeSupplyConfirmTask', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * POST 货值定稿创建供货计划版本【后台测试用】
 * @pathParam apiVersion true
 * @queryParam priceVersionId true
 * @queryParam versionType true
 */
export function finalizeCreateSupplyPlanVersionUsingPOST({ params, data }) {
  return request('supplyPlan/finalizeCreateSupplyPlanVersion', {
    method: 'POST',
    params,
    data,
  });
}

/**
 * GET 刷新供货确认数据【后台测试用】
 * @queryParam affiliationMonth true
 * @pathParam apiVersion true
 * @queryParam isAll false
 * @queryParam isSign false
 * @queryParam projectFid false
 */
export function handleConfirmSupplyDataUsingGET({ params, data }) {
  return request('supplyPlan/handleConfirmSupplyData', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 判断是否已存在预算版
 * @pathParam apiVersion true
 * @queryParam projectFid true
 */
export function isExistBudgetVersionUsingGET({ params, data }) {
  return request('supplyPlan/isExistBudgetVersion', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 是否需要供货确认（项目PM）
 * @pathParam apiVersion true
 * @queryParam projectId false
 */
export function isNeedSpplyConfirmUsingGET({ params, data }) {
  return request('supplyPlan/isNeedSpplyConfirm', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 是否显示供货确认（项目PM）
 * @pathParam apiVersion true
 * @queryParam projectId true
 * @queryParam versionDate true
 */
export function isShowSupplyConfirmUsingGET({ params, data }) {
  return request('supplyPlan/isShowSupplyConfirm', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 供货计划最新的版本阶段
 * @pathParam apiVersion true
 * @queryParam projectFid true
 */
export function newestVersionStageUsingGET({ params, data }) {
  return request('supplyPlan/newestVersionStage', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 全盘供货计划货值
 * @pathParam apiVersion true
 * @queryParam code false
 * @queryParam projectId true
 * @queryParam type false
 * @queryParam year false
 */
export function overAllValueUsingGET({ params, data }) {
  return request('supplyPlan/overAllValue', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 导出报表
 * @pathParam apiVersion true
 * @queryParam code false
 * @queryParam projectId true
 */
export function overAllValueExportUsingGET({ params, data }) {
  return request('supplyPlan/overAllValueExport', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 全盘供货计划年份
 * @pathParam apiVersion true
 * @queryParam projectId true
 */
export function overAllYearsUsingGET({ params, data }) {
  return request('supplyPlan/overAllYears', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 刷新供货视图中间表数据【后台测试用】
 * @pathParam apiVersion true
 * @queryParam projectId false
 */
export function refreshMediDataUsingGET({ params, data }) {
  return request('supplyPlan/refreshMediData', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 发送供货确认待办任务（批量处理）--同月底前两天定时任务【后台测试用】
 * @pathParam apiVersion true
 */
export function sendSupplyConfirmTaskUsingGET({ params, data }) {
  return request('supplyPlan/sendSupplyConfirmTask', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * POST 发送供货确认待办任务(单个项目)【后台测试用】
 * @pathParam apiVersion true
 * @queryParam projectId true
 * @queryParam versionId true
 */
export function sendToDoMsgUsingPOST({ params, data }) {
  return request('supplyPlan/sendToDoMsg', {
    method: 'POST',
    params,
    data,
  });
}

/**
 * PUT 设置投资版考核标签
 * @pathParam apiVersion true
 * @queryParam projectFid true
 * @queryParam versionId true
 */
export function setAssessmentTagUsingPUT({ params, data }) {
  return request('supplyPlan/setAssessmentTag', {
    method: 'PUT',
    params,
    data,
  });
}

/**
 * PUT 供货确认（项目PM）
 * @pathParam apiVersion true
 * @queryParam projectId true
 * @queryParam versionDate true
 */
export function supplyConfirmUsingPUT({ params, data }) {
  return request('supplyPlan/supplyConfirm', {
    method: 'PUT',
    params,
    data,
  });
}

/**
 * GET 供货确认详情页面（项目PM）
 * @pathParam apiVersion true
 * @queryParam id true
 * @queryParam versionDate true
 */
export function supplyConfirmDetailUsingGET({ params, data }) {
  return request('supplyPlan/supplyConfirmDetail', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 供货确认导出
 * @pathParam apiVersion true
 * @queryParam projectName false
 * @queryParam status false
 * @queryParam versionDate true
 */
export function supplyConfirmExportUsingGET({ params, data }) {
  return request('supplyPlan/supplyConfirmExport', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 供货计划版本信息
 * @pathParam apiVersion true
 * @queryParam code false
 * @queryParam type false
 * @queryParam versionId true
 */
export function getVersionDataUsingGET({ params, data }) {
  return request('supplyPlan/supplyPlanVersion', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * POST 手动创建供货计划预算版新版本
 * @pathParam apiVersion true
 * @queryParam projectFid true
 */
export function createSupplyBudgetVersionUsingPOST({ params, data }) {
  return request('supplyPlan/supplyPlanVersion', {
    method: 'POST',
    params,
    data,
  });
}

/**
 * PUT 修改投资版考核标签
 * @pathParam apiVersion true
 * @queryParam projectFid true
 * @queryParam versionId true
 */
export function updateAssessmentTagUsingPUT({ params, data }) {
  return request('supplyPlan/updateAssessmentTag', {
    method: 'PUT',
    params,
    data,
  });
}

/**
 * GET 供货计划版本对比详情
 * @pathParam apiVersion true
 * @queryParam deadline false
 * @queryParam projectId true
 */
export function versionCompareDetailUsingGET({ params, data }) {
  return request('supplyPlan/versionCompareDetail', {
    method: 'GET',
    params,
    data,
  });
}

/**
 * GET 供货计划版本列表
 * @pathParam apiVersion true
 * @queryParam projectFid true
 * @queryParam versionType true
 */
export function versionListUsingGET({ params, data }) {
  return request('supplyPlan/versionList', {
    method: 'GET',
    params,
    data,
  });
}
